﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/RopaOnline.Master" AutoEventWireup="true"
    CodeBehind="ManufacturerSearch.aspx.cs" Inherits="Upsam.RopaOnline.Web.ManufacturerSearch" %>

<asp:Content ID="cntHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="cntContext" ContentPlaceHolderID="cphContext" runat="server">
    <div>
        <fieldset style="width: 98%; float: left; margin-top: 10px;">
            <legend>Búsqueda Fabricante</legend>
            <div style="width: 98%; float: left; margin-top: 10px;">
                <div style="width: 48%; float: left; padding-left: 10px;">
                    <asp:Label ID="lblManufacturerName" runat="server" Text="fabricante" AssociatedControlID="txtManufacturerName"></asp:Label>
                </div>
                <div style="width: 48%; float: left; padding-left: 10px;">
                    <asp:TextBox ID="txtManufacturerName" runat="server" Width="98%"></asp:TextBox>
                </div>
            </div>
            <div style="width: 98%; float: left; margin-top: 10px; text-align: center; margin-bottom: 10px;">
                <asp:Button ID="btnSearch" runat="server" Text="Buscar" OnClick="btnSearch_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnAdd" runat="server" Text="Agregar" OnClick="btnAdd_Click" />
            </div>
        </fieldset>
        <div style="width: 98%; float: left; height: auto; margin-top: 10px;">
            <div style="width: 98%; float: left; margin-bottom: 10px;">
                Resultado</div>
            <asp:GridView ID="grvManufacturer" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None"
                BorderWidth="1px" CellPadding="3" DataKeyNames="IdFabricante" DataSourceID="ldsManufacturer"
                GridLines="Horizontal">
                <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                <Columns>
                <asp:ButtonField ButtonType="Link" CommandName="EditItem" CausesValidation="false"
						Text="Editar" />
                    <asp:CommandField ShowDeleteButton="True" />
                    <asp:BoundField DataField="IdFabricante" HeaderText="IdFabricante" InsertVisible="False"
                        ReadOnly="True" SortExpression="IdFabricante" HeaderStyle-CssClass="oculto" ItemStyle-CssClass="oculto" />
                    <asp:BoundField DataField="Fabricante1" HeaderText="Fabricante1" SortExpression="Fabricante1" />
                </Columns>
                
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                <AlternatingRowStyle BackColor="#F7F7F7" />
            </asp:GridView>
            <asp:LinqDataSource ID="ldsManufacturer" runat="server" ContextTypeName="Upsam.RopaOnline.Modelo.Data.RopaOnLineDataContext"
                EnableDelete="True" OrderBy="Fabricante1" TableName="Fabricantes" Where="Fabricante1.Containt(@Fabricante1)">
                <WhereParameters>
                    <asp:ControlParameter ControlID="txtManufacturerName" Name="Fabricante1" PropertyName="Text"
                        Type="String" ConvertEmptyStringToNull="false" />
                </WhereParameters>
            </asp:LinqDataSource>
        </div>
    </div>
</asp:Content>
